package com.jj.service.impl;

import com.jj.dao.StatisticsDao;
import com.jj.dao.impl.StatisticsDaoImpl;
import com.jj.entity.Department;
import com.jj.entity.Employee;
import com.jj.service.StatisticsService;

import java.util.List;
import java.util.Map;

public class StatisticsServiceImpl implements StatisticsService {
    private StatisticsDao statisticsDao = new StatisticsDaoImpl();
    @Override
    public int getTotalEmployees() {
        return statisticsDao.getTotalEmployees();
    }

    @Override
    public int getTotalDepartments() {
        return statisticsDao.getTotalDepartments();
    }

    @Override
    public int getThisMonthHires() {
        return statisticsDao.getThisMonthHires();
    }

    @Override
    public Map<Department, Integer> getDepartmentStats() {
        return statisticsDao.getDepartmentStats();
    }

    @Override
    public Map<String, Integer> getPositionStats() {
        return statisticsDao.getPositionStats();
    }

    @Override
    public List<Employee> getRecentEmployees(int limit) {
        return statisticsDao.getRecentEmployees(limit);
    }
}
